onremoveitem Event |
This event is fired when a tree item is removed from the tree.
Syntax
Inline HTML |
<div cordysType="wcp.libaray.ui.Tree" id=treeID treeData=treeDataID treeSchema=treeSchemaID onremoveitem="handler()"> ... </div> |
Event Property |
treeID.onremoveitem = handler |
Event Information
To invoke |
Remove an item from tree by calling remove method. |
Default Action |
Removes an item to the tree and initiates any action associated with this event. |
Event Object Properties
Although event handlers in the DHTML Object Model do not receive parameters directly, a handler can query an event object for data.
Property |
Description |
---|---|
treeItem |
Read-only. Object that denotes the tree item that is currently removed. |
Example
The following example shows how the event is used.
//Function called on onremoveitem function displayRemoved() { var item = window.event.treeItem; //Alert item data that was removed application.notify("removed item \n\n" + cordys.getXML(item.data)); } <!-- tree definition inside the BODY tag --> <!-- sampleSchema denotes the schema defined and sampleData denotes the data to be shown in tree --> <div cordysType="wcp.libaray.ui.Tree" id="sampleTree" treeSchema="sampleSchema" treeData="sampleData" onremoveitem="displayRemoved()"> </div>